package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.approval.dto.IssuedApproFlowAddDTO;
import org.jsola.approval.vo.ApproFlowVO;
import org.jsola.core.Result;

import java.util.List;

/**
 * 审批
 *
 * @author wcl
 */
@Api(tags = "hr-审批")
public interface IApprovalControllerAPI {

    /**
     * 发布流程(包含流程,表单,流程进程等)
     *
     * @param flowInfo 流程信息
     * @return 结果
     */
    @ApiOperation(value = "发布流程(包含流程,表单,流程进程等)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "流程信息", value = "flowInfo", required = true, dataType = "String", paramType = "body")
    })
    Result publishApproFlow(String flowInfo);


    /**
     * 下发审批到公司
     *
     * @param issuedApproFlowAddDTO 下发审批到公司
     * @return 保存结果
     */
    @ApiOperation(value = "下发审批到公司")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "issuedApproFlowAddDTO", dataType = "IssuedApproFlowAddDTO"
                    , value = "公司Id和审批Id", paramType = "body")
    })
    Result<List<ApproFlowVO>> saveIssuedApproFlow(IssuedApproFlowAddDTO issuedApproFlowAddDTO);
}
